﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Style x:Key="DataGridBase" TargetType="{x:Type DataGrid}">
        <Setter Property="FontSize" Value="16" />
        <Setter Property="CanUserReorderColumns" Value="False" />
        <Setter Property="CanUserSortColumns" Value="False" />
        <Setter Property="AutoGenerateColumns" Value="False" />
        <Setter Property="ColumnHeaderStyle">
            <Setter.Value>
                <Style TargetType="{x:Type DataGridColumnHeader}">
                    <Setter Property="FontSize" Value="16" />
                </Style>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type DataGrid}" BasedOn="{StaticResource DataGridBase}">
        <Setter Property="IsReadOnly" Value="True" />
        <Setter Property="CanUserDeleteRows" Value="False" />
    </Style>
    <Style x:Key="EditableDataGrid" TargetType="{x:Type DataGrid}" BasedOn="{StaticResource DataGridBase}">
        <Setter Property="RowValidationErrorTemplate">
            <Setter.Value>
                <ControlTemplate>
                    <Grid Margin="0,-2,0,-2" ToolTip="{Binding RelativeSource={RelativeSource FindAncestor, 
                            AncestorType={x:Type DataGridRow}}, Path=(Validation.Errors).CurrentItem.ErrorContent}">
                        <Ellipse StrokeThickness="0" Fill="Red" Width="{TemplateBinding FontSize}" Height="{TemplateBinding FontSize}" />
                        <TextBlock Text="!" FontSize="{TemplateBinding FontSize}" FontWeight="Bold" Foreground="White" HorizontalAlignment="Center" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="TestResultDataGridCell" TargetType="{x:Type TextBlock}">
        <Setter Property="HorizontalAlignment" Value="Right" />
    </Style>
    <Style x:Key="DefaultDataGridColumnHeader" TargetType="{x:Type DataGridColumnHeader}">
        <Setter Property="Background" Value="#0f1d7a" />
        <Setter Property="Foreground" Value="White" />
        <Setter Property="Height" Value="40" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
    </Style>
</ResourceDictionary>